<template>
  <page-header-wrapper class="indexBox">
    <a-card :bordered="false">
      <div class="table-page-search-wrapper">
        <a-form layout="inline">
          <a-row :gutter="48">
            <a-col :md="5" :sm="24">
              <a-form-item label>
                <a-input-search v-model="queryParam.memberId" placeholder="请输入角色名称/代码" />
              </a-form-item>
            </a-col>

            <a-col :md="(!advanced && 10) || 24" :sm="24">
              <span>
                <a-button type="primary" icon="search" @click="loadDataRefresh()">查询</a-button>
              </span>
            </a-col>

            <a-col :md="(!advanced && 9) || 24" :sm="24" style="text-align: right;">
              <span>
                <a-button type="primary" icon="plus" @click="loadDataRefresh()">新增</a-button>
              </span>
            </a-col>
          </a-row>
        </a-form>
      </div>

      <a-row>
        <a-col :span="24" class="justTop">
          <a-col :span="12">为您找到相关结果约100,000,0个， 搜索用时 (0.23秒)</a-col>
          <a-col :span="12" class="justCur" style="text-align: right;">
            <span
              @click="allSeq(index)"
              :class="{styleName:index == current}"
              v-for="(item,index) in seqList"
              :key="index"
            >{{item.seqName}}</span>
            <!-- <span>默认排</span>
            <span>按时间排序</span>-->
          </a-col>
        </a-col>
        <a-col :span="24" class="justCont">
          <a-row :gutter="16">
            <a-col :span="6" v-for="(item,index) in dataFile" :key="index">
              <div class="gutter-box">
                <div>
                  <img src="../../assets/p_002.png" alt />
                </div>

                <div>
                  <div class="gutter-a">
                    <span>{{item.a}}</span>
                  </div>
                  <div class="gutter-b">
                    <span>{{item.b}}</span>
                  </div>
                  <div class="gutter-c">
                    <a-col :span="8">
                      <span>{{item.c}}</span>
                    </a-col>
                    <a-col :span="16" style="text-align: right;">
                      <a-icon type="edit" />
                      <span style="padding-right:8px">编辑</span>
                      <a-icon type="snippets" />
                      <span style="padding-right:8px">预览</span>
                      <a-icon type="delete" />
                      <span>删除</span>
                    </a-col>
                  </div>
                </div>
              </div>
            </a-col>
          </a-row>
        </a-col>
      </a-row>
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { putAction, postAction, getAction } from '@/api/manage'
export default {
  name: 'TableList',
  components: {},
  data() {
    return {
      // 高级搜索 展开/关闭
      advanced: false,
      // 查询参数
      queryParam: {},
      seqList: [
        { id: 1, seqName: '默认排' },
        { id: 2, seqName: '按时间排序' },
      ],
      dataFile: [
        {
          img: '../../assets/background.png',
          a: '经营看板',
          b: '定义从ERP系统，MES系统实时获取订单数据，生产数据，告警信息，订单生产工艺流程等数据',
          c: '5 小时前',
        },
        {
          img: '../../assets/background.png',
          a: '客户看板',
          b: '定义从ERP系统，对集团的所有订单，客户，销售金额，产品排名等数据',
          c: '11小时前',
        },
        {
          img: '../../assets/background.png',
          a: '办公看板',
          b: '定义从办公系统，对集团所有的办公人员考勤，审批，先进工作者，公司和集团介绍等信息',
          c: '4 小时前',
        },
        {
          img: '../../assets/background.png',
          a: '报警看板',
          b: '定义从MES系统，实时获取告警信息，集中展示到看板中心',
          c: '8 小时前',
        },
        {
          img: '../../assets/background.png',
          a: '视屏看板',
          b: '定义从集团和工厂获取的实时监控，可视化监控看板',
          c: '3 小时前',
        },
        {
          img: '../../assets/background.png',
          a: '财务看板',
          b: '定义从ERP系统，获取财务人员和管理层需要的数据',
          c: '1 小时前',
        },
      ],
      current: 0,
    }
  },

  methods: {
    loadDataRefresh() {},
    allSeq(index) {
      console.log(index)
      this.current = index
    },
  },
}
</script>
<style lang="less" >
.justTop {
  margin: 20px 20px 0 0;
  .justCur {
    span {
      padding: 0 20px;
      cursor: pointer;
    }
    .styleName {
      text-align: center;
      height: 38px;
      border-radius: 5px;
      line-height: 38px;
      color: #fff;
      display: inline-block;
      width: 110px;
      cursor: pointer;
      background-color: rgba(153, 153, 153, 1);
    }
  }
}
.justCont {
  .gutter-box {
    min-height: 400px;
    border: 1px solid rgba(228, 228, 228, 1);
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    cursor: pointer;
    img {
      width: 100%;
    }
    span {
      margin: 10px 0 0 10px;
      font-size: 16px;
      display: inline-block;
    }
    .gutter-a {
      height: 55px;
      span {
        font-size: 30px;
        font-weight: 600;
        font-family: '微软雅黑';
      }
    }
    .gutter-b {
      height: 90px;
    }
    .gutter-c {
      height: 45px;
    }
  }
  .ant-col-6 {
    margin-top: 20px;
  }
}
</style>
